<template>
  <a-tabs v-model="tab" style="background: #fff; padding: 8px 16px;">
    <a-tab-pane v-if="$permissionJudge('UserManager')" tab="登录用户" key="UserManager">
      <UserManage/>
    </a-tab-pane>
    <a-tab-pane v-if="$permissionJudge('RoleManager')" tab="角色权限" key="RoleManager">
      <RolesManage/>
    </a-tab-pane>
  </a-tabs>
</template>
<script>
import UserManage from './UserManage'
import RolesManage from './RolesManage'

export default {
  name: 'PermissionConfig',
  components: { UserManage, RolesManage },
  data: () => ({
    tab: 'UserManage'
  }),
  created() {
    this.tab = ['UserManager', 'RoleManager'].filter(e => this.$permissionJudge(e))[0]
  }
}
</script>
